package cn.com.cennavi.minelab.service.od.client;

import cn.com.cennavi.minelab.service.od.ShowResultDataInputParam;
import cn.com.cennavi.minelab.service.od.ShowResultDataOutputResult;
import cn.com.cennavi.minelab.service.od.ShowResultDataPrx;
import cn.com.cennavi.minelab.service.od.ShowResultDataPrxHelper;

public class ShowResultDataIClient {

	public static void main(String[] args) {
		int status = 0;
		Ice.Communicator ic = null;

		try {
			ic = Ice.Util.initialize(args);
			Ice.ObjectPrx base = ic.stringToProxy("ShowResultData:default -p 10000");
			ShowResultDataPrx showResultData = ShowResultDataPrxHelper.checkedCast(base);

			if (showResultData == null) {
				throw new Error("Invalid Proxy");
			}
			//
			ShowResultDataInputParam askData = new ShowResultDataInputParam();
			askData.userID = "azkaban";
			askData.projectID = "odModel_odNum";
			askData.filePath = "hdfs://nujhadoop/test/minlab/od/azkaban_odModel_odNum_1488508675683";
			//
			ShowResultDataOutputResult output = showResultData.showData(askData);
			System.out.println(output.errCode);
			System.out.println(output.errMsg);
			System.out.println(output.url);			

		} catch (Ice.LocalException e) {
			e.printStackTrace();
			status = 1;

		} catch (Exception e) {
			System.err.println(e.getMessage());
			status = 1;

		} finally {
			if (ic != null)
				ic.destroy();

		}

		System.exit(status);

	}

}
